<template>
  <div>
    <div class="selectList">
      <div class="absBox">
        <h4 class="title">{{ title }}</h4>
        <div class="content" @click='isShow=true'>
          <span>{{ val.length !== 0 ? val[0] : plhd }}</span>
          <img class="imgIcon" src="~/static/icon/icon_arrows_more_40.png" />
        </div>
      </div>
    </div>
    <popup-picker :show.sync="isShow" @on-change="changes" :data="dataList" :columns="1" v-model="val" show-name></popup-picker>
  </div>
</template>

<script>
import { PopupPicker, Group, Picker } from 'vux'
export default {
  components: {
    PopupPicker,
    Picker,
    Group,
  },
  props: {
    title: String,
    plhd: String,
    dataList: Array,
    modelType: String,
  },
  data() {
     return {
       val: [],
       isShow: false,

     }
  },
  
  methods: {
    changes(e) {
      this.val = e;
      const params = {
        type: this.modelType,
        val: e
      };
      this.$emit('getPickerItem', params);
    }
  }
}
</script>

<style lang="less" scoped>


  .selectList {
    flex: 1;
    box-sizing: border-box;
    margin-bottom: 0.32rem;

    .title {
      color: #999;
      font-size: 0.28rem;
      line-height: 0.3rem;
      font-weight: bold;
    }

    .content {
      display: flex;
      justify-content: space-between;
      align-items: center;
      height: 0.88rem;
      line-height: 0.88rem;
      box-sizing: border-box;
      border-bottom: 2px solid #E5E8ED;

      span {
        color: #c7c7c7;
        font-size: 0.28rem;
        line-height: 0.4rem;
      }

    }
    
  }
  /deep/ .weui-cell_access .weui-cell__ft:after {
    display: none;
  }

  .imgIcon {
		width: 0.4rem;
		height: 0.4rem;
  }
  
  /deep/ .vux-cell-box:not(:first-child):before {
    display: none;
  }
  
  
</style>
